<template>
  <div class="conten_box">
    <vue-pdf-embed v-if="pdfSource.url" :source="pdfSource" />
  </div>
</template>
<script setup>
import { onMounted, ref, reactive } from "vue";
import {useRoute} from "vue-router";
import VuePdfEmbed from "vue-pdf-embed";
const route = useRoute();
const pdfSource = reactive({
  url: "",
  cMapUrl: route.query.url,
  cMapPacked: true
});

// 获取pdf需要的url
const getInvitation = () => {
  pdfSource.url = pdfSource.cMapUrl;
};

onMounted(() => {
  getInvitation();
});
</script>